package org.redis.cluster.admin.client.adapter;

import java.util.Arrays;

import org.redis.cluster.loadbalance.slot.SlotClientConfig;

public class SlotClientConfigAdapter {
	
	/**
	 * @param config
	 * @return
	 */
	public static SlotClientConfig adaptClientConfig(org.redis.cluster.admin.client.model.SlotClientConfig config) {
		SlotClientConfig result=new SlotClientConfig();
		result.setId(config.getId());
		result.setClient(config.getClient());
		result.setHost(config.getHost());
		result.setPort(config.getPort());
		result.setConnection(config.getConnection());
		result.setTimeout(config.getTimeout());
		result.setSlots(Arrays.asList(config.getSlots()));
		return result;
	}
}